﻿<phone:PhoneApplicationPage x:Class="_43Things.Personal"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            d:DesignHeight="768"
                            d:DesignWidth="480"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            SupportedOrientations="Portrait"
                            mc:Ignorable="d">
    <phone:PhoneApplicationPage.Resources>

        <!-- MOVIE RESOURCES -->

        <!-- The template for the list header. This will scroll as a part of the list. -->
        <DataTemplate x:Key="movieListHeader">
            <TextBlock Text="new releases" Style="{StaticResource PhoneTextTitle1Style}"/>
        </DataTemplate>

        <!-- The group header template, for groups in the main list -->
        <DataTemplate x:Key="movieGroupHeader">
            <Border Background="{StaticResource PhoneAccentBrush}" Padding="{StaticResource PhoneTouchTargetOverhang}">
                <TextBlock Text="{Binding Key}" Style="{StaticResource PhoneTextLargeStyle}"/>
            </Border>
        </DataTemplate>

        <!-- The template for groups when they are items in the "jump list". Not setting -->
        <!-- the GroupItemTemplate property will disable "jump list" functionality. -->
        <DataTemplate x:Key="groupItemHeader">
            <Border Background="{StaticResource PhoneAccentBrush}" Margin="{StaticResource PhoneTouchTargetOverhang}" Padding="{StaticResource PhoneTouchTargetOverhang}">
                <TextBlock Text="{Binding Key}" Style="{StaticResource PhoneTextLargeStyle}"/>
            </Border>
        </DataTemplate>

        <!-- The template for movie items -->
        <DataTemplate x:Key="movieItemTemplate">
            <Grid Margin="{StaticResource PhoneTouchTargetOverhang}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Width="110" Height="150" Source="{Binding ImageUrl}" VerticalAlignment="Top"/>
                <StackPanel Grid.Column="1" VerticalAlignment="Top">
                    <TextBlock Text="{Binding Title}" Style="{StaticResource PhoneTextLargeStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" TextWrapping="Wrap" Margin="12,-12,12,6"/>
                    <TextBlock Text="{Binding Stars}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                    <TextBlock Text="{Binding Information}" Style="{StaticResource PhoneTextSmallStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                    <TextBlock Text="{Binding Description}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" FontFamily="{StaticResource PhoneFontFamilySemiLight}"/>
                </StackPanel>
            </Grid>
        </DataTemplate>

        <!--<data:MoviesByCategory x:Key="movies"/>
        <data:MoreCommand x:Key="moreCommand"/>-->

        <!-- BUDDIES RESOURCES -->
        <!--<data:PeopleByFirstName x:Key="buddies"/>

        <data:GroupToBrushValueConverter x:Key="groupBrush"/>-->

    </phone:PhoneApplicationPage.Resources>
    <!--  LayoutRoot is the root grid where all page content is placed  -->
    <Grid x:Name="LayoutRoot"
          Width="496"
          Height="768"
          Background="Transparent">
        <!--<Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>-->

        <!--  TitlePanel contains the name of the application and page title  -->
        <!--  <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">  -->
        <!--  <TextBlock x:Name="ApplicationTitle" Text="43 Things" Style="{StaticResource PhoneTextNormalStyle}"/>  -->
        <!--  <TextBlock x:Name="PageTitle" Text="personal" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" HorizontalAlignment="Left" Width="367"/>  -->
        <!--  </StackPanel>  -->

        <!--  ContentPanel - place additional content here  -->
        <!--<Grid x:Name="ContentPanel"
              Grid.Row="1"
              Margin="12,0,12,0">-->
        <controls:Pivot Title="43 Things">
            <controls:PivotItem Header="linq">

                <toolkit:LongListSelector x:Name="linqMovies"
                                              Background="Transparent"
                                               ListHeaderTemplate="{StaticResource movieListHeader}"
                    GroupHeaderTemplate="{StaticResource movieGroupHeader}"
                    GroupItemTemplate="{StaticResource groupItemHeader}"
                    ItemTemplate="{StaticResource movieItemTemplate}">

                </toolkit:LongListSelector>
            </controls:PivotItem>

            <controls:PivotItem Header="code">
                <toolkit:LongListSelector x:Name="codeMovies"
                                              Background="Transparent"
                                               ListHeaderTemplate="{StaticResource movieListHeader}"
                    GroupHeaderTemplate="{StaticResource movieGroupHeader}"
                    GroupItemTemplate="{StaticResource groupItemHeader}"
                    ItemTemplate="{StaticResource movieItemTemplate}">

                    <!--  The group footer template, for groups in the main list  -->
                    <toolkit:LongListSelector.GroupFooterTemplate>
                        <DataTemplate>
                            <!--  <local:CommandButton DataContext="{Binding}" Content="{Binding GetMore}" Command="{StaticResource moreCommand}" CommandParameter="{Binding}"/>  -->
                        </DataTemplate>
                    </toolkit:LongListSelector.GroupFooterTemplate>

                </toolkit:LongListSelector>

            </controls:PivotItem>

            <controls:PivotItem Header="buddies">

                <toolkit:LongListSelector x:Name="buddies" Background="Transparent">

                    <toolkit:LongListSelector.GroupItemsPanel>
                        <ItemsPanelTemplate>
                            <toolkit:WrapPanel Orientation="Horizontal"/>
                        </ItemsPanelTemplate>
                    </toolkit:LongListSelector.GroupItemsPanel>
                    <toolkit:LongListSelector.GroupItemTemplate>
                        <DataTemplate>
                            <Border Background="{Binding Converter={StaticResource groupBrush}}" Width="99" Height="99" Margin="6" IsHitTestVisible="{Binding HasItems}">
                                <TextBlock Text="{Binding Key}" 
                                       FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                                       FontSize="36"
                                       Margin="{StaticResource PhoneTouchTargetOverhang}"
                                       Foreground="{StaticResource PhoneForegroundBrush}"                                        
                                       VerticalAlignment="Bottom"/>
                            </Border>
                        </DataTemplate>
                    </toolkit:LongListSelector.GroupItemTemplate>

                    <toolkit:LongListSelector.GroupHeaderTemplate>
                        <DataTemplate>
                            <Border Background="Transparent">
                                <Border Background="{StaticResource PhoneAccentBrush}" Width="75" Height="75" HorizontalAlignment="Left">
                                    <TextBlock Text="{Binding Key}" 
                                           Foreground="{StaticResource PhoneForegroundBrush}" 
                                           Style="{StaticResource PhoneTextExtraLargeStyle}"
                                           VerticalAlignment="Bottom"/>
                                </Border>
                            </Border>
                        </DataTemplate>
                    </toolkit:LongListSelector.GroupHeaderTemplate>

                    <toolkit:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="{StaticResource PhoneTouchTargetOverhang}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Image Width="110" Height="150" Source="{Binding ImageUrl}" VerticalAlignment="Top"/>
                                <StackPanel Grid.Column="1" VerticalAlignment="Top">
                                    <TextBlock Text="{Binding FullName}" Style="{StaticResource PhoneTextLargeStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Margin="12,-12,12,6"/>
                                    <TextBlock Text="{Binding Email}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Mobile:" Style="{StaticResource PhoneTextSmallStyle}"/>
                                        <TextBlock Text="{Binding Mobile}" Style="{StaticResource PhoneTextSmallStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="Home:" Style="{StaticResource PhoneTextSmallStyle}"/>
                                        <TextBlock Text="{Binding Home}" Style="{StaticResource PhoneTextSmallStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                                    </StackPanel>
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </toolkit:LongListSelector.ItemTemplate>

                </toolkit:LongListSelector>

            </controls:PivotItem>

        </controls:Pivot>
        <!--</Grid-->
    </Grid>

    <!--  Sample code showing usage of ApplicationBar  -->
    <!--
        <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
        <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
        <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
        <shell:ApplicationBar.MenuItems>
        <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
        <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
        </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
        </phone:PhoneApplicationPage.ApplicationBar>
    -->

</phone:PhoneApplicationPage>
